<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href="file:///C|/wamp/www/assets/ico/favicon.ico">
    <link href="../../css/estilo.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="../../js/mayusc.js"></script> 

    <!-- Bootstrap core CSS -->
    <link href="../../css/bootstrap.css" rel="stylesheet" media="screen">
    <!-- Just for debugging purposes. Don't actually copy this line! -->
    <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <title>Proyecto SGA</title>
</head>

<body class="fondo">
<div id="hld">

    


<div class="container">
<div class="panel panel-default">
<div class="panel-body">

    
    <form name="frmEditarGrupo" method="post" action="guardar_grupo.php" class="form-horizontal" role="form">
  <!-- Main component for a primary marketing message or call to action -->
  <div class="well well-lg">
    <div class="imagen_head"><img src="../../img/header/icon-48-category.png" width="48" height="48"></div>
    <div class="titulo_head">Editar Grupo</div>
    <div class="toolbar_head">
      <div class="btn-toolbar" role="toolbar">
              <button type="submit" class="btn btn-info"><span class="glyphicon glyphicon-floppy-disk"></span><br> Guardar</button>
<a href="index.php" class="btn btn-danger"><span class="glyphicon glyphicon-remove"></span><br>Cancelar</a>		
	
                  <button type="button" class="btn btn-default">
                    <span class="glyphicon glyphicon-question-sign"></span><br> Ayuda
                  </button>
     
      </div><!-- /btn-toolbar -->  
    </div><!-- /toolbar head -->  
  </div><!-- /Well -->   
<?php
include_once("ClsGrupo.php");

include_once("../nivel/ClsNivel.php");
$objnivel=new ClsNivel;
$resultado_nivel=$objnivel->consultarNivelPorParametro('combo','','','');


$id_grup=$_GET["id_grupo"];
	
$objgrupo=new ClsGrupo;
$resultado=$objgrupo->consultarGrupoPorParametro('id',$id_grup,'0','1');
	
while($row=@mysql_fetch_array($resultado)){
	$cod=$row["GRP_IdGrupo"];
	$idgrupo=$row["GRP_IdGrupo"];
	$nombre=$row["GRP_Nombre"];
	$abreviatura=$row["GRP_Abreviatura"];
	$idnivel=$row["NIV_IdNivel"];
}

?>


<div class="panel panel-default">
  <!-- Default panel contents -->
	<div class="panel-body">
    

         
<input type="hidden" name="codigo" value="<?php echo $cod ?>">
<input id="accion" name="accion" value="modificar" type="hidden">
	<fieldset>
    <legend>Detalles</legend>
    <div class="form-group">
    	<label for="lblIdGrupo" class="col-sm-2 control-label">ID Grupo:</label>
        <div class="col-sm-3">
            <input name="txtIdGrupo" type="text"  class="form-control" id="txtIdGrupo" value="<?php echo $idgrupo ?>" disabled>
        </div>
  	</div>
    
	<div class="form-group">
    	<label for="lblNombre" class="col-sm-2 control-label">Nombre:</label>
        <div class="col-sm-3">
            <input name="txtNombre" type="text"  required class="form-control" id="txtNombre" title="Se necesita un nombre de grupo" value="<?php echo $nombre ?>" onChange="conMayusculas(this)" >
        </div>
  	</div>
    
	<div class="form-group">
    	<label for="lblAbreviatura" class="col-sm-2 control-label">Abreviatura:</label>
        <div class="col-sm-3">
            <input name="txtAbreviatura" type="text"  required class="form-control" id="txtAbreviatura" title="Se necesita un nombre de abreviatura" value="<?php echo $abreviatura ?>" onChange="conMayusculas(this)" >
        </div>
  	</div>
 
 	<div class="form-group">
    	<label for="lblNivel" class="col-sm-2 control-label">Nivel:</label>
        <div class="col-sm-3">
            <select name="cboIdNivel" class="form-control" required>
          <?php
		while($row=mysql_fetch_array($resultado_nivel)){
			?>

            <?php 
				if($idnivel==$row['NIV_IdNivel']){?>
				 <option value="<?php echo $row['NIV_IdNivel']?>" selected="selected"><?php echo $row['NIV_Nombre']?></option>
				<?php } else { ?>		
				<option value="<?php echo $row['NIV_IdNivel']?>"><?php echo $row['NIV_Nombre']?></option>
				<?php }?>
            
          
            
	<?php } ?>
        </select>
        </div>
  	</div>      
    </fieldset>



  </div><!-- /panel-body -->
</div><!-- /panel-default -->


    </form>
    
</div><!-- /panel general -body -->
</div><!-- /panel general -default -->
</div> <!-- /container -->


    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="../../js/jquery.min.js"></script>
    <script src="../../js/bootstrap.min.js"></script>
</div>    
  </body>
</html>